package com.eye.catcher.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 基地表
 * </p>
 *
 * @author huzhiwei
 * @since 2022-05-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class TYwDaBaseInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * 基地编号
     */
    @TableField("BASE_CODE")
    private String baseCode;

    /**
     * 基地名称
     */
    @TableField("BASE_NAME")
    private String baseName;

    /**
     * 基地主任 id
     */
    @TableField("BASE_DIRECTOR_ID")
    private String baseDirectorId;

    /**
     * 基地主任名称
     */
    @TableField("BASE_DIRECTOR_NAME")
    private String baseDirectorName;

    /**
     * 所属城市编码
     */
    @TableField("CITY_CODE")
    private String cityCode;
    /**
     * 大区
     */
    @TableField("SUBREGION")
    private String subregion;
    /**
     * 亚区
     */
    @TableField("REGION")
    private String region;

    /**
     * 所属城市名称
     */
    @TableField("CITY_NAME")
    private String cityName;

    @TableField("TYPE")
    private String type;

    /**
     * 同类占比
     */
    @TableField("SAME_PROPORTION")
    private String sameProportion;


    /**
     * 所在区县
     */
    @TableField("SUBORDINATE_COUNTIES")
    private String subordinateCounties;

    /**
     * 邮编
     */
    @TableField("POST_CODE")
    private String postCode;

    /**
     * 手机号
     */
    @TableField("PHONE")
    private String phone;

    /**
     * 地址
     */
    @TableField("ADDRESS")
    private String address;

    @TableField("UNIT_ID")
    private String unitId;
    @TableField("UNIT_CODE")
    private String unitCode;
    @TableField("UNIT_NAME")
    private String unitName;

    // 种植面积
    @TableField("PLANTING_AREA")
    private String plantingArea;
    // 地区  t_cod_da_base_region2
    @TableField("REGION2")
    private String region2;
    //精度
    @TableField("BASE_PRECISION")
    private String basePrecision;
    //纬度
    @TableField("BASE_LATITUDE")
    private String baseLatitude;
    //年度
    @TableField("ANNUAL")
    private Integer annual;

    /**
     * 创建人id
     */
    @TableField("CREATE_USER_ID")
    private String createUserId;

    /**
     * 创建人 登录名
     */
    @TableField("CREATE_LOGIN_NAME")
    private String createLoginName;

    /**
     * 创建姓名
     */
    @TableField("CREATE_USER_NAME")
    private String createUserName;

    /**
     * 更新人id
     */
    @TableField("UPDATE_USER_ID")
    private String updateUserId;

    /**
     * 更新人 登录名
     */
    @TableField("UPDATE_LOGIN_NAME")
    private String updateLoginName;

    /**
     * 更新人姓名
     */
    @TableField("UPDATE_USER_NAME")
    private String updateUserName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("UPDATE_TIME")
    private LocalDateTime updateTime;
    /**
     * 排序号
     */
    @TableField("SORT_NO")
    private Integer sortNo;
    /**
     * 来源
     */
    @TableField("SOURCE")
    private String source;

    @TableField(exist = false)
    private String fileCount;

    public TYwDaBaseInfo() {
    }

    public TYwDaBaseInfo(String baseCode, String baseName, String baseDirectorName,
                         String subregion,String region,String unitName,
                         String cityName, String subordinateCounties, String region2,
                         String phone, String address,String plantingArea,
                         String basePrecision,String baseLatitude,Integer annual,
                         String createUserId, String createLoginName, String createUserName, LocalDateTime createTime, Integer sortNo,String source) {
        this.baseCode = baseCode;
        this.baseName = baseName;
        this.baseDirectorName = baseDirectorName;
        this.subregion = subregion;
        this.region = region;
        this.unitName = unitName;
        this.cityName = cityName;
        this.subordinateCounties = subordinateCounties;
        this.region2 = region2;
        this.phone = phone;
        this.address = address;
        this.plantingArea = plantingArea;
        this.basePrecision = basePrecision;
        this.baseLatitude = baseLatitude;
        this.annual = annual;
        this.createUserId = createUserId;
        this.createLoginName = createLoginName;
        this.createUserName = createUserName;
        this.createTime = createTime;
        this.sortNo = sortNo;
        this.source = source;
    }
}
